<template>
	<div class="list-item" @click="handleClick">
		<img :src="item.url" alt />
		<p>{{ item.title }}</p>
		<p>
			<b style="color: red;">{{ item.price }}</b>
			<small style="color: #ccc">
				<s>{{ item.oldPrice }}</s>
			</small>
		</p>
	</div>
</template>

<script>
export default {
	methods: {
		handleClick() {
			this.$emit('click')
		}
	},
	props: {
		item: {
			type: Object
		}
	}
}
</script>


<style lang="scss">
.list-item {
	width: 50%;
	padding: 10px;
	box-sizing: border-box;
	img {
		width: 100%
	}
}
</style>